package com.woniuxy.yoga.course.client;

import com.woniuxy.yoga.commons.core.model.Result;
import com.woniuxy.yoga.course.client.dto.user.UserInfoDTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 用户的服务访问类
 */
@FeignClient(name = "user-service",path = "/user")
public interface UserClient {

    /**
     * 根据id查询用户信息
     * @param userId 用户id
     * @return 用户信息对象
     */
    @GetMapping("/userInfo/getByUserId/{userId}")
    public Result<UserInfoDTO> getUserByUserId(@PathVariable("userId") Integer userId);
}
